﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MngFavorateCodification.aspx.cs"
    Inherits="LDSP.UI.EnterpriseAdmin.MngFavorateCodification" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <link type="text/css" href="../../../Styles/bg.css" rel="Stylesheet" />
    <script type="text/javascript" src="../../../Scripts/jquery-1.4.1.js"></script>
    <script type="text/javascript" src="../../../Scripts/jqex.js"></script>
    <script type="text/javascript" src="../../../Scripts/Common.js"></script>
    <script type="text/javascript" src="../../../Scripts/calendar.js"></script>
    <title>
        <%=TitleName %>管理</title>
    <script type="text/javascript">
        $(function () {
            var ctrl = $('#expand');
            ctrl.attr("isExpand", true);
            ctrl.bind("click", function () { ShowFilterArea('filterArea', ctrl, 2); KeepGridHead("gridHead"); });
            ShowFilterArea('filterArea', ctrl, 2);

            $('#gridArea :checkbox').each(function () {
                $(this).bind("click", function () {
                    CheckDocIDs("hid_docIDs", "grd_list", "docid", this);
                })
            });

            KeepGridHead("gridHead");
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:HiddenField ID="hid_docIDs" runat="server" />
    <div>
        <table style="width: 100%">
            <tr>
                <td valign="top" width="15%">
                    <div class="mngTitle" style="background-color: #BBD9C0">
                        <span class="mngEmphasis" style="color: #000000">栏目</span>
                    </div>
                    <asp:TreeView ID="tre_obj" runat="server" BorderColor="#CCCCCC" BorderStyle="Dashed"
                        BorderWidth="1px" ShowLines="True" Width="99%" OnSelectedNodeChanged="tre_obj_SelectedNodeChanged">
                        <SelectedNodeStyle BackColor="#999999" Font-Bold="True" />
                    </asp:TreeView>
                </td>
                <td style="width: 20px;">
                </td>
                <td valign="top">
                    <div class="mngTitle" style="background-color: #BBD9C0">
                        <table width="100%">
                            <tr>
                                <td>
                                    <span class="mngEmphasis" style="color: #000000">
                                        <%=TitleName %>列表</span>
                                    <asp:Label ID="TotalRecords" runat="server" Text="Label" CssClass="searchResultLabel"
                                        ForeColor="#003399"></asp:Label>
                                </td>
                                <td style="text-align: right">
                                    <a class="helplink" href="javascript:ShowHelpDialog('../UserManagement/Help.aspx#1')">
                                        帮助</a>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <fieldset>
                        <legend>查询</legend>
                        <table id="filterArea" class="mngDetail">
                            <tr>
                                <td class="itemLabel">
                                    搜索内容：
                                </td>
                                <td class="itemValue">
                                    <asp:TextBox ID="txt_name" runat="server" CssClass="itemCtrl" ForeColor="Silver"
                                        Width="394px"></asp:TextBox><input type="button" id="expand" value="展开" class="mngBtn" /><cc1:AutoCompleteExtender
                                            TargetControlID="txt_name" ServicePath="~/Web Service/LDSPService.asmx" ServiceMethod="GetAutoCompleteList"
                                            MinimumPrefixLength="1" EnableCaching="true" CompletionInterval="10" ID="AutoCompleteExtender1"
                                            runat="server">
                                        </cc1:AutoCompleteExtender>
                                </td>
                            </tr>
                            <tr>
                                <td class="itemLabel">
                                </td>
                                <td class="itemValue">
                                    <asp:CheckBox ID="chb_pdf" runat="server" Text='搜索时包含PDF' />
                                </td>
                            </tr>
                            <tr>
                                <td class="itemLabel">
                                    优先级 ：
                                </td>
                                <td class="itemValue">
                                    <asp:DropDownList ID="ddl_priority" runat="server" CssClass="itemCtrl">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td class="itemLabel">
                                    是否有效：
                                </td>
                                <td class="itemValue">
                                    <asp:DropDownList ID="ddl_isValid" runat="server" CssClass="itemCtrl">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td class="itemLabel">
                                    发布日期：
                                </td>
                                <td class="itemValue">
                                    <asp:TextBox ID="txt_releaseStartDT" runat="server" CssClass="itemCtrlHalf" onclick="HS_setDate(this)"></asp:TextBox>
                                    ～
                                    <asp:TextBox ID="txt_releaseEndDT" runat="server" CssClass="itemCtrlHalf" onclick="HS_setDate(this)"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="itemLabel">
                                    生效日期：
                                </td>
                                <td class="itemValue">
                                    <asp:TextBox ID="txt_implementStartDT" runat="server" CssClass="itemCtrlHalf" onclick="HS_setDate(this)"></asp:TextBox>
                                    ～
                                    <asp:TextBox ID="txt_implementEndDT" runat="server" CssClass="itemCtrlHalf" onclick="HS_setDate(this)"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="itemLabel">
                                    上传日期：
                                </td>
                                <td class="itemValue">
                                    <asp:TextBox ID="txt_uploadStartDT" runat="server" CssClass="itemCtrlHalf" onclick="HS_setDate(this)"></asp:TextBox>
                                    ～
                                    <asp:TextBox ID="txt_uploadEndDT" runat="server" CssClass="itemCtrlHalf" onclick="HS_setDate(this)"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="itemLabel">
                                    <asp:DropDownList ID="ddl_pageSize" runat="server" OnSelectedIndexChanged="ddl_pageSize_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </td>
                                <td class="itemValue">
                                    <asp:Button ID="btn_search" runat="server" Text="搜索" OnClick="btn_search_Click" CssClass="mngBtn" />&nbsp;
                                    <input type="button" value="重置" onclick="resetFilterCondition('filterArea')" class="mngBtn" />
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                    <div id="gridArea">
                        <div id="gridHead">
                            <asp:Button ID="btn_add" runat="server" Text="添加" OnClick="btn_add_Click" CssClass="mngBtn" /><asp:Button
                                ID="Button2" runat="server" Text="删除选中" OnClientClick="return confirm('您确认要删除么？')"
                                OnClick="btn_delete_Click" CssClass="mngBtn" />
                            <asp:Button ID="btn_Export" runat="server" Text="导出选中" CssClass="mngBtn" OnClick="btn_export_Click" />
                            <asp:Button ID="btn_ExportAll" runat="server" Text="导出全部" CssClass="mngBtn" 
                                OnClick="btn_exportAll_Click" />
                            <asp:GridView ID="grd_list_head" runat="server" AutoGenerateColumns="False" EmptyDataText="当前没有查到任何数据！"
                                DataKeyNames="id" OnRowCommand="grd_list_RowCommand" BackColor="#666699" BorderColor="#999999"
                                AllowPaging="True" AllowSorting="True" CellPadding="3" GridLines="Vertical" Width="100%"
                                OnSorting="grd_list_Sorting" Style="margin-top: 0px">
                                <Columns>
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            <asp:CheckBox ID="chb_selectAll" runat="server" onclick="selectAll(this,'grd_list')" />
                                        </HeaderTemplate>
                                        <ItemStyle HorizontalAlign="Center" Width="40px" />
                                    </asp:TemplateField>
                                    <asp:BoundField HeaderText="序号" ItemStyle-Width="40px" ItemStyle-HorizontalAlign="Center">
                                        <ItemStyle HorizontalAlign="Center" Width="40px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="ecPriority" HeaderText="优先级" SortExpression="ecPriority"
                                        ItemStyle-Width="45px" ItemStyle-HorizontalAlign="Center">
                                        <ItemStyle HorizontalAlign="Center" Width="45px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="类别" SortExpression="categoryID" ItemStyle-Width="100px">
                                        <ItemStyle Width="100px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="name" HeaderText="名称" SortExpression="name" ItemStyle-Width="100px">
                                        <ItemStyle Width="100px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Organization" HeaderText="发布机构" SortExpression="Organization"
                                        ItemStyle-Width="100px">
                                        <ItemStyle Width="100px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="ReferenceNumber" HeaderText="发布文号" SortExpression="ReferenceNumber"
                                        ItemStyle-Width="100px">
                                        <ItemStyle Width="100px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="ReleaseDT" HeaderText="发布时间" SortExpression="ReleaseDT"
                                        ItemStyle-Width="60px">
                                        <ItemStyle Width="60px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="ImplementDT" HeaderText="实施时间" SortExpression="ImplementDT"
                                        ItemStyle-Width="60px">
                                        <ItemStyle Width="60px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="IsValid" HeaderText="有效" SortExpression="IsValid" ItemStyle-Width="30px">
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="ecName" HeaderText="法规概述" SortExpression="ecName" />
                                    <asp:BoundField DataField="ecKeyItems" HeaderText="关键条款" SortExpression="ecKeyItems"
                                        ItemStyle-Width="250px">
                                        <ItemStyle Width="250px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="invalidList" HeaderText="失效法规列表" ItemStyle-Width="150px">
                                    </asp:BoundField>
                                    <asp:BoundField DataField="InvalidDescription" HeaderText="失效描述" ItemStyle-Width="150px">
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="实施措施" ItemStyle-Width="200px">
                                        <ItemStyle Width="200px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="ecSelfEvaluation" HeaderText="自我评估" SortExpression="ecSelfEvaluation"
                                        ItemStyle-Width="200px">
                                        <ItemStyle Width="200px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="ecPrincipal" HeaderText="责任人" SortExpression="ecPrincipal"
                                        ItemStyle-Width="60px">
                                        <ItemStyle Width="60px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="PDF" ItemStyle-Width="40px"></asp:BoundField>
                                    <asp:TemplateField HeaderText="操作" ShowHeader="False">
                                        <ItemStyle HorizontalAlign="Left" Width="55px" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="任务计划" ShowHeader="False">
                                        <ItemStyle HorizontalAlign="Center" Width="55px" />
                                    </asp:TemplateField>
                                </Columns>
                                <HeaderStyle BackColor="#BBD9C0" Font-Bold="True" ForeColor="Black" BorderStyle="None" />
                            </asp:GridView>
                        </div>
                        <asp:GridView ID="grd_list" runat="server" AutoGenerateColumns="False" EmptyDataText="当前没有查到任何数据！"
                            DataKeyNames="id" OnRowCommand="grd_list_RowCommand" OnRowDataBound="grd_list_RowDataBound"
                            BackColor="#666699" BorderColor="#999999" AllowPaging="True" AllowSorting="True"
                            CellPadding="3" GridLines="Vertical" Width="100%" OnPageIndexChanging="grd_list_PageIndexChanging"
                            OnSorting="grd_list_Sorting" Style="margin-top: 0px" ShowHeader="False">
                            <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                            <RowStyle BackColor="#EEEEEE" ForeColor="Black" BorderStyle="Solid" BorderWidth="1px" />
                            <EmptyDataRowStyle BorderStyle="None" BorderWidth="0px" Font-Bold="True" Font-Size="16pt"
                                ForeColor="white" />
                            <Columns>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        <asp:CheckBox ID="chb_selectAll" runat="server" onclick="selectAll(this,'grd_list')" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chb" runat="server" />
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="40px" />
                                </asp:TemplateField>
                                <asp:BoundField HeaderText="序号" ItemStyle-Width="40px" ItemStyle-HorizontalAlign="Center">
                                    <ItemStyle HorizontalAlign="Center" Width="40px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="ecPriority" HeaderText="优先级" SortExpression="ecPriority"
                                    ItemStyle-Width="45px" ItemStyle-HorizontalAlign="Center">
                                    <ItemStyle HorizontalAlign="Center" Width="45px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField HeaderText="类别" SortExpression="categoryID" ItemStyle-Width="100px">
                                    <ItemStyle Width="100px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="name" HeaderText="名称" SortExpression="name" ItemStyle-Width="100px">
                                    <ItemStyle Width="100px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="Organization" HeaderText="发布机构" SortExpression="Organization"
                                    ItemStyle-Width="100px">
                                    <ItemStyle Width="100px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="ReferenceNumber" HeaderText="发布文号" SortExpression="ReferenceNumber"
                                    ItemStyle-Width="100px">
                                    <ItemStyle Width="100px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="ReleaseDT" HeaderText="发布时间" SortExpression="ReleaseDT"
                                    ItemStyle-Width="60px">
                                    <ItemStyle Width="60px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="ImplementDT" HeaderText="实施时间" SortExpression="ImplementDT"
                                    ItemStyle-Width="60px">
                                    <ItemStyle Width="60px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="IsValid" HeaderText="有效" SortExpression="IsValid" ItemStyle-Width="30px">
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:BoundField DataField="" HeaderText="实施措施" SortExpression="" />
                                <asp:BoundField DataField="ecKeyItems" HeaderText="关键条款" SortExpression="ecKeyItems"
                                    ItemStyle-Width="250px">
                                    <ItemStyle Width="250px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="invalidList" HeaderText="失效法规列表" ItemStyle-Width="150px">
                                </asp:BoundField>
                                <asp:BoundField DataField="InvalidDescription" HeaderText="失效描述" ItemStyle-Width="150px">
                                </asp:BoundField>
                                <asp:BoundField HeaderText="实施措施" ItemStyle-Width="200px">
                                    <ItemStyle Width="200px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="ecSelfEvaluation" HeaderText="自我评估" SortExpression="ecSelfEvaluation"
                                    ItemStyle-Width="200px">
                                    <ItemStyle Width="200px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="ecPrincipal" HeaderText="责任人" SortExpression="ecPrincipal"
                                    ItemStyle-Width="60px">
                                    <ItemStyle Width="60px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField HeaderText="PDF" ItemStyle-Width="40px"></asp:BoundField>
                                <asp:TemplateField HeaderText="操作" ShowHeader="False">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandArgument='<%# Eval("id") %>'
                                            CommandName="updateItem" Text="修改"></asp:LinkButton>
                                        <asp:LinkButton ID="LinkButton4" runat="server" CausesValidation="False" CommandArgument='<%# Eval("id") %>'
                                            CommandName="downloadItem" Text="下载"></asp:LinkButton><br />
                                        <asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="False" CommandName="deleteItem"
                                            OnClientClick="return confirm('您确认要删除么？')" Text='删除' CommandArgument='<%# Eval("id") %>'></asp:LinkButton>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Left" Width="55px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="任务计划" ShowHeader="False">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="taskPlan"
                                            Text='管理' CommandArgument='<%# Eval("id") %>'></asp:LinkButton>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="55px" />
                                </asp:TemplateField>
                            </Columns>
                            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#CCFF99" Font-Bold="True" ForeColor="Black" BorderStyle="None" />
                            <AlternatingRowStyle BackColor="#DCDCDC" />
                        </asp:GridView>
                        <asp:Button ID="Button1" runat="server" Text="添加" OnClick="btn_add_Click" CssClass="mngBtn" /><asp:Button
                            ID="Button3" runat="server" Text="删除选中" OnClientClick="return confirm('您确认要删除么？')"
                            OnClick="btn_delete_Click" CssClass="mngBtn" />
                        <asp:Button ID="Button4" runat="server" Text="导出选中" CssClass="mngBtn" OnClick="btn_export_Click" />
                        <asp:Button ID="Button5" runat="server" Text="导出全部" CssClass="mngBtn" 
                                OnClick="btn_exportAll_Click" />
                    </div>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
